翻訳と辞書
Words near each other
・ Constrained writing
・ Constrained-layer damping
・ Constraint
・ Constraint (classical mechanics)
・ Constraint (computer-aided design)
・ Constraint (information theory)
・ Constraint (mathematics)
・ Constraint algebra
・ Constraint algorithm
・ Constraint automaton
・ Constraint Composite Graph
・ Constraint counting
・ Constraint Grammar
・ Constraint graph
・ Constraint graph (layout)
Constraint Handling Rules
・ Constraint inference
・ Constraint learning
・ Constraint logic programming
・ Constraint programming
・ Constraint satisfaction
・ Constraint satisfaction dual problem
・ Constraint satisfaction problem
・ Constraint-based Routing Label Distribution Protocol
・ Constraint-induced movement therapy
・ Constraints accounting
・ Constricta
・ Constricta (fungus)
・ Constricted elimia
・ Constricting Rage of the Merciless


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Constraint Handling Rules : ウィキペディア英語版
Constraint Handling Rules

Constraint Handling Rules (CHR) is a declarative, rule-based language, introduced in 1991 by Thom Frühwirth.〔Thom Frühwirth. ''Introducing Simplification Rules''. Internal Report ECRC-LP-63, ECRC Munich, Germany, October 1991, Presented at the Workshop Logisches Programmieren, Goosen/Berlin, Germany, October 1991 and the Workshop on Rewriting and Constraints, Dagstuhl, Germany, October 1991.〕〔Thom Frühwirth. Theory and Practice of Constraint Handling Rules. Special Issue on Constraint Logic Programming (P. Stuckey and K. Marriott, Eds.), Journal of Logic Programming, Vol 37(1-3), October 1998. 〕 Originally intended for constraint programming, CHR finds applications in abductive reasoning, multi-agent systems, natural language processing, compilation, scheduling, spatial-temporal reasoning, testing and verification, and type systems.
A CHR program, sometimes called a ''constraint handler'', is a set of rules that maintain a ''constraint store'', a multi-set of logical formulas. Execution of rules may add or remove formulas from the store, thus changing the state of the program. The order in which rules "fire" on a given constraint store is non-deterministic.
Although CHR is Turing complete, it is not commonly used as a programming language in its own right. Rather, it is used to extend a ''host language'' with constraints. Prolog is by far the most popular host language and CHR is included in several Prolog implementations, including SICStus and SWI-Prolog, although CHR implementations also exist for Haskell, Java and C. In contrast to Prolog, CHR rules are multi-headed and are executed in a committed-choice manner using a forward chaining algorithm.
==Language overview==
The concrete syntax of CHR programs depends on the host language, and in fact programs embed statements in the host language that are executed to handle some rules. The host language supplies a data structure for representing terms, including logical variables. Terms represent constraints, which can be thought of as "facts" about the program's problem domain. Traditionally, Prolog is used as the host language, so its data structures and variables are used. The rest of this section uses a neutral, mathematical notation that is common in the CHR literature.
A CHR program, then, consists of rules that manipulate a multi-set of these terms, called the ''constraint store''. Rules come in three types:〔
* Simplification rules have the form h_1, \dots, h_n \,|\, g_1, \dots, g_m \Longleftrightarrow b_1, \dots, b_o. When they match the ''heads'' h_1, \dots, h_n and the ''guards'' g_1, \dots, g_m hold, simplification rules may rewrite the heads into the ''body'' b_1, \dots, b_o.
* Propagation rules have the form h_1, \dots, h_n \,|\, g_1, \dots, g_m \Longrightarrow b_1, \dots, b_o. These rules add the constraints in the body to the store, without removing the heads.
* Simpagation rules combine simplification and propagation. They are written h_1, \dots, h_\ell \,\backslash\, h_, \dots, h_n \,|\, g_1, \dots, g_m \Longleftrightarrow b_1, \dots, b_o. For a simpagation rule to fire, the constraint store must match all the rules in the head and the guards must hold true. The \ell constraints before the \backslash are kept, as a in a propagation rule; the remaining n - \ell constraints are removed.
Since simpagation rules subsume simplification and propagation, all CHR rules follow the format
:H_k \,\backslash\, H_r \,|\, G \Longleftrightarrow B
where each of H_k, H_r, G, B is a conjunction of constraints: H_k, H_r and B contain CHR constraints, while the guards G are built-in. Only one of H_k, H_r needs to be non-empty.
The host language must also define ''built-in constraints'' over terms. The guards in rules are built-in constraints, so they effectively execute host language code. The built-in constraint theory must include at least true (the constraint that always holds), fail (the constraint that never holds, and is used to signal failure) and equality of terms, i.e., unification.〔 When the host language does not support these features, they must be implemented along with CHR.〔
Execution of a CHR program starts with an initial constraint store. The program then proceeds by matching rules against the store and applying them, until either no more rules match (success) or the fail constraint is derived. In the former case, the constraint store can be read off by a host language program to look for facts of interest. Matching is defined as "one-way unification": it binds variables only on one side of the equation. Pattern matching can be easily implemented when as unification when the host language supports it.〔

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Constraint Handling Rules」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.